import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'
import mongoose from 'mongoose'

@Schema()
export class Rule {
  @Prop()
  label: string

  @Prop()
  key: string

  @Prop()
  parentKey: string

  _id: mongoose.Schema.Types.ObjectId
}

export const RuleSchema = SchemaFactory.createForClass(Rule)
